import { createSSRApp } from "vue";
import store from './store'
import unnavbar from "./commpent/un-navbar";
import unpicker from "./commpent/un-picker";
import unscrollview from "./commpent/un-scrollview";
import test from "./commpent/test";
import App from "./App.vue";






export function createApp() {
	const app = createSSRApp(App);

	app.config.globalProperties.$onLaunched = new Promise((resolve, reject) => {
		app.config.globalProperties.$isResolve = resolve
	})


	//注册全局组件
	app.component('un-navbar', unnavbar);//顶部导航栏组件
	app.component('un-picker', unpicker);//多选组件
	app.component('un-scrollview', unscrollview);//列表加载组件
	app.component('te-st', test);//列表加载组件
	//注册全局组件

	app.use(store)
	return {
		app,
	};
}